package com.epfly.iface.promo.activity.enums;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * 部门/职务:0.不限;2.指定部门;3:指定职务;
 */
public enum ActivityObjectTypeCascadeEnum {


    NO_LIMIT((byte) 0, "不限"), ASSIGN_DEPT((byte) 1, "指定部门"), ASSIGN_JOB((byte) 2, "指定职务"),
    ;




     ActivityObjectTypeCascadeEnum(Byte key, String value) {
        this.key = key;
        this.value = value;
    }

    private static final Map<Byte, ActivityObjectTypeCascadeEnum> loopUp = Maps.newHashMap();

     static {
         for (ActivityObjectTypeCascadeEnum value : values()) {
             loopUp.put(value.getKey(), value);
         }
     }

     public static String getValue(Byte key) {
         return loopUp.get(key).getValue();
     }

    private Byte key;

    private String value;


    public Byte getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
